package com.jlu.easyexcel.service.impl;

import com.jlu.easyexcel.dao.StudentDao;
import com.jlu.easyexcel.domain.Student;
import com.jlu.easyexcel.service.StudentService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

@Service
public class StudentServiceImpl implements StudentService {

  @Autowired
  StudentDao studentDao;


  @Override
  public void readExcel(List<Student> students) {

//    for (Student student : students) {
//      System.out.println("student:" + student);
//    }

    for (Student student : students) {
      studentDao.save(student);
    }
  }
}
